package com.navinfo.opentsp.platform.computing.analysis.entity;

import kafka.serializer.Encoder;
import kafka.utils.VerifiableProperties;

/**
 * Encode an Object to a JSON-encoded byte array.
 */
public class CountEntityEncoder<T> extends CountEntitySerializer<T> implements Encoder<T> {

   /* public CountEntityEncoder(){}*/

    public CountEntityEncoder(VerifiableProperties props) {
        configure(new CountEntitySerializerConfig(props.props()));
    }

    @Override
    public byte[] toBytes(T val) {
        return serialize(null, val);
    }
}
